# uncompyle6 version 3.9.0
# Python bytecode version base 3.8.0 (3413)
# Decompiled from: Python 3.8.10 (tags/v3.8.10:3d8993a, May  3 2021, 11:48:03) [MSC v.1928 64 bit (AMD64)]
# Embedded file name: 生成md5.py
# Compiled at: 2020-07-20 21:01:32
# Size of source mod 2**32: 257 bytes
import os, hashlib

m = '['
with open('文件路径.txt', 'r', encoding='utf-8') as (file):
    path = file.read().strip()
    print(path.rstrip())
path = path
file_name_list = os.listdir(path)
for i in file_name_list:
    need_path = path + '\\' + i
    with open(need_path, 'rb') as (f):
        content = f.read()
        md5 = hashlib.md5(content).hexdigest()
    out_fwm = i.split('-1')[0]
    out_bbh = ('1' + i.split('-1')[1]).replace('.jar', '')
    out_md5 = md5
    jj = {'serviceKey': out_fwm,
          'versionNum': out_bbh,
          'md5': out_md5}
    jj = str(jj) + ',\n'
    m = m + jj
else:
    current_path = os.getcwd()
    m = m.strip()[:-1]
    m = m + ']'
    file_test = open((current_path + '/' + 'test.json'), 'w', encoding='utf-8')
    file_test.write(m.replace("'", '"'))
    file_test.close()
# okay decompiling 生成md5.pyc
